package com.spark.gaea.mvc.utils;

import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.support.WebBindingInitializer;
import org.springframework.web.context.request.WebRequest;

import java.util.Date;

public class CustomWebBindingInitializer implements WebBindingInitializer {
	@Override
	public void initBinder(final WebDataBinder webDataBinder, final WebRequest webRequest) {
		webDataBinder.registerCustomEditor(Date.class, new ApolloDateEditor(true));
	}
}
